package cluster

import (
	"sync"

	"k8s.io/client-go/kubernetes"
)

var (
	k8sClients = make(map[string]K8sClusterCache)
	mutex      sync.RWMutex
)

type K8sClusterCache struct {
	kubernetes.Interface
}

func GetK8sClient(clusterId string) (kubernetes.Interface, bool) {
	mutex.RLock()
	defer mutex.RUnlock()

	client, exists := k8sClients[clusterId]
	return client, exists
}

func GetAllK8sClient() map[string]K8sClusterCache {
	return k8sClients
}

func InitClusterClient() {
}
